package com.leadingsoft.pwxk.enums;

public enum LoginLogEnum {
	LOGIN_IN(
			"Login",
			"登入"),
	LOGIN_OUT(
			"Logout",
			"登出"),
	SUCCESS(
			"success",
			"登录成功"),
	FAILURE(
			"fail",
			"登录失败");
	private String val;
	private String desc;

	LoginLogEnum(String val, String desc) {
		this.val = val;
		this.desc = desc;
	}

	public String getVal() {
		return val;
	}

	public void setVal(String val) {
		this.val = val;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public static String getDescByVal(String val) {
		for (LoginLogEnum e : LoginLogEnum.values()) {
			if (e.getVal().equals(val)) {
				return e.getDesc();
			}
		}
		return null;
	}
}
